﻿Public Class Nlocalidad
    Private objlocalidad As Datos.DLocalidad
    Public Sub New()
        objlocalidad = New Datos.DLocalidad
    End Sub

    Public Function cargarLocalidad(ByVal item As Entidades.ELocalidad) As Boolean

        Dim oDatos As New Datos.DLocalidad
        Dim oLocalidades As New List(Of Entidades.ELocalidad)
        Dim band As Boolean
        Try

            band = oDatos.insertar(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function
    Public Function ModificarLocalidad(ByVal item As Entidades.ELocalidad) As Boolean

        Dim oDatos As New Datos.DLocalidad
        Dim oLocalidades As New List(Of Entidades.ELocalidad)
        Dim band As Boolean
        Try

            band = oDatos.modificar(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function EliminarLocalidad(ByVal item As Entidades.ELocalidad) As Boolean

        Dim oDatos As New Datos.DLocalidad
        Dim oLocalidades As New List(Of Entidades.ELocalidad)
        Dim band As Boolean
        Try

            band = oDatos.eliminar(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function
    Public Function ver() As List(Of Entidades.ELocalidad)
        Return objlocalidad.ver
    End Function
End Class
